import { ProductEditComponent } from './edit/edit.component';
import { FormsModule } from '@angular/forms';
import { AppPaginationModule } from './../../widgets/pagination/pagination.module';
import { AppPaginationComponent } from './../../widgets/pagination/pagination.component';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ProductInfoRoutingModule } from './product-info-routing.module';
import { ProductAccountComponent } from './account/account.component';
import { ProductCostComponent } from './cost/cost.component';
import { ProductFundComponent } from './fund/fund.component';
import { ProductManagerComponent } from './manager/manager.component';
import { ProductComponent } from './product/product.component';
import { ProductServiceComponent } from './service/service.component';
import { StopfundComponent } from './stopfund/stopfund.component';
import * as flatpickr from 'flatpickr';
import { FlatpickrModule, FLATPICKR } from '../../../assets/angularx-flatpickr';
import { CustomFormsModule } from 'ng2-validation';
import { CostPageComponent } from './content/cost-page/cost-page.component';
import { FundPageComponent } from './content/fund-page/fund-page.component';
import { ManagerPageComponent } from './content/manager-page/manager-page.component';
import { StopFundPageComponent } from './content/stop-fund-page/stop-fund-page.component';
import { PubProductPageComponent } from './content/pub-product-page/pub-product-page.component';
import { OtmProductPageComponent } from './content/otm-product-page/otm-product-page.component';
import { OtoProductPageComponent } from './content/oto-product-page/oto-product-page.component';
import { AnnuityProductPageComponent } from './content/annuity-product-page/annuity-product-page.component';
import { AnnuityPageComponent } from './content/annuity-page/annuity-page.component';
import { SocialPageComponent } from './content/social-page/social-page.component';
import { OldagePageComponent } from './content/oldage-page/oldage-page.component';
import { OldageProductPageComponent } from './content/oldage-product-page/oldage-product-page.component';
export function flatpickrFactory() {
  return flatpickr;
}

@NgModule({
  imports: [
    CommonModule,
    ProductInfoRoutingModule,
    AppPaginationModule,
    FormsModule,
    CustomFormsModule,
    FlatpickrModule.forRoot({
      provide: FLATPICKR,
      useFactory: flatpickrFactory
    })
  ],
  declarations: [
    ProductAccountComponent,
    ProductCostComponent,
    ProductFundComponent,
    ProductManagerComponent,
    ProductComponent,
    ProductServiceComponent,
    StopfundComponent,
    ProductEditComponent,
    CostPageComponent,
    FundPageComponent,
    ManagerPageComponent,
    StopFundPageComponent,
    PubProductPageComponent,
    OtmProductPageComponent,
    OtoProductPageComponent,
    AnnuityProductPageComponent,
    AnnuityPageComponent,
    SocialPageComponent,
    OldagePageComponent,
    OldageProductPageComponent
  ],
  entryComponents: [
    CostPageComponent,
    FundPageComponent,
    ManagerPageComponent,
    StopFundPageComponent,
    PubProductPageComponent,
    OtmProductPageComponent,
    OtoProductPageComponent,
    AnnuityProductPageComponent,
    AnnuityPageComponent,
    SocialPageComponent,
    OldagePageComponent,
    OldageProductPageComponent
  ]
})

export class ProductInfoModule { }
